package cannot.serviceImpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cannot.mapper.OtherTypeMapper;
import cannot.pojo.OtherType;
import cannot.pojo.OtherTypeExample;
import cannot.service.OtherTypeService;

@Service
public class OtherTypeServiceImpl implements OtherTypeService{

	@Autowired
	OtherTypeMapper otherTypeMapper;
	
	public List<OtherType> listByMainType(Integer id) {
		return otherTypeMapper.listByMainType(id);
	}

	public void updateOtherType(OtherType otherType) {
		otherTypeMapper.updateByPrimaryKey(otherType);
		
	}

	public int insertOtherType(OtherType OtherType) {
		return otherTypeMapper.insert(OtherType);
	}

	public void deleteOtherType(Integer id) {
		otherTypeMapper.deleteByPrimaryKey(id);		
	}

	public OtherType selectOtherType(Integer id) {
		return otherTypeMapper.selectByPrimaryKey(id);
	}

	@Override
	public List<OtherType> listOtherType() {
		return otherTypeMapper.selectByExample(null);
	}


}
